﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:l="clr-namespace:HelloKinkuma"
        xmlns:kinkuma="clr-namespace:Okazuki.MVVM.PrismSupport.Interactivity;assembly=Okazuki.MVVM.PrismSupport"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
        xmlns:Custom="http://www.codeplex.com/prism" 
        x:Class="HelloKinkuma.MainWindow"
        Title="Kinkuma Hello world" SizeToContent="Height" Width="250">
    <Window.DataContext>
        <l:MainWindowViewModel />
    </Window.DataContext>
    <i:Interaction.Triggers>
        <Custom:InteractionRequestTrigger SourceObject="{Binding AlertRequest, Mode=OneWay}">
            <kinkuma:ShowMessageBoxAction/>
        </Custom:InteractionRequestTrigger>
    </i:Interaction.Triggers>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBox Text="{Binding ValidatesOnDataErrors=True, Path=Input, UpdateSourceTrigger=PropertyChanged}" />
        <ItemsControl Grid.Row="1" ItemsSource="{Binding ValidationErrors}" DisplayMemberPath="ErrorMessage" Foreground="Red" />
        <Button Content="Alert" Grid.Row="2" Command="{Binding GreetCommand}" />
    </Grid>
</Window>


